package com.xiaojimao.Pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

@Data
@TableName("article")
public class Article {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private Long authorId;
    @NotBlank(message = "文章标题不能为空")
    @Size(max = 20, message = "文章标题不能超过20个字!")
    private String articleTitle;
    private String cover;
    @NotBlank(message = "文章内容不能为空")
    private String content;
    private Integer status;
    private Integer articleVerified;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
